<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('manage/editPostAgent')}">
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>代理名</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-name" readonly="readonly" name="name" value="{$agent.name}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-group" class="col-sm-2 control-label"><span class="form-required">*</span>代理开户</label>
				<div class="col-md-6 col-sm-10">
					<table class="table table-hover table-bordered" name="advaccount">
						<thead>
							<tr>
								<th>账户号</th>
								<th>账户状态</th>
								<th>挂户时间</th>
							</tr>
						</thead>
						<tbody>
							<foreach name='agent.adaccounts' item = 'vo'>
								<tr>
									<td><input type="text" class="form-control" autocomplete='off' name="advaccount[{$vo.id}][account_num]}" value="{$vo.account_num}"></td>
									<td><input type="text" class="form-control" autocomplete='off' name="advaccount[{$vo.id}][status]}" value="{$vo.status}"></td>
									<td><input type="text" class="form-control js-datetime" autocomplete='off' name="advaccount[{$vo.id}][down_time]" value="{$vo.down_time|date="Y-m-d H:i",###}"></td>
								</tr>
								<input type="hidden" class="form-control" name="advaccount[{$vo.id}][id]" value="{$vo.id}">
							</foreach>
						</tbody>
					</table>
					<p><span style="color:red;">注意* :</span>账户状态 1:代表正常,2:代表挂掉.只能输入1或2</p>
				</div>
			</div>
			<div class="col-sm-offset-2 col-sm-10">
				<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
				<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
			</div>
			<input type="hidden" class="form-control" id="input-id" name="id" value="{$agent.id}">
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
